 ____  _ _     _        ____                _      
/ ___|| (_) __| | ___  |  _ \ _   _ _______| | ___ 
\___ \| | |/ _` |/ _ \ | |_) | | | |_  /_  / |/ _ \
 ___) | | | (_| |  __/ |  __/| |_| |/ / / /| |  __/
|____/|_|_|\__,_|\___| |_|    \__,_/___/___|_|\___|
     by Emir Sakic                                 v1.0

Program:      Slide Puzzle v1.0
Description:  A TI-83/83+ ASM game
Code:         Z80 Assembly
Size:         Game: 1419 / 1434 bytes
              Level: 810 / 815 bytes
Author:       Emir Sakic
Date:         07.10.2001


What is Slide Puzzle?
---------------------
It is not clear when the first slide puzzle was invented or made.
Though it was not the first of this type of puzzle, 
the one that really started it all off was the "Puzzle of 15" 
which was made and sold by the Embossing Company from New York in 1870's.
It spread quickly to many countries and owing to the uncountable number 
of devoted players it had conquered, it became a plague.
This puzzle consisted of 15 numbered square pieces that could be slidden around 
in a square box that was big enough to contain 16 pieces. 
The pieces should be placed at random in the box and you should sort the pieces 
in ascending order by just sliding them.

In 1878 Sam Loyd, America's greatest puzzle-expert, "drove the whole world crazy" 
(in his own words) with his newly "discovered" "14-15 puzzle".
This was a variation of the "Puzzle of 15" where instead of a randomly filled 
starting position the fifteen pieces were arranged in the square box in regular order, 
only with the 14 and 15 reversed.
He then offered a $1000 prize (about $40,000 at today's prices) for a solution.
The problem that he formulated was impossible to solve and the prize has never been claimed.
However the "14-15 puzzle" attracted a world wide attention that can only be compared 
with the Rubik's Cube that conquered the world 100 years later. 

Since the famous Sam Loyd's slide puzzle thousands of different slide puzzles are made.
With different dimensions and number of pieces, many of them formed a picture 
when correctly solved.

This is a slide puzzle program for TI-83 (Plus), graphic calculator by Texas Instruments.
It features a 6x4 slide puzzle with 23 pieces which are moved with a mouse arrow.
Several blocks can be moved at once giving you the "real feeling".
Slide Puzzle v1.0 supports extern levels so you can easily make your own puzzles.


How to use
----------
-Make sure that you have ION shell installed on your TI-83/83+ calculator.
-Send zslide.83p / zslide.8xp to your calculator.
-Send at least one puzzle level to calculator i.e. zpuznums.83p / zpuznums.8xp.
-Run ION and start Slide Puzzle v1.0.


Keys
----
Load screen:
-Up/Down   - choose puzzle
-ENTER/2nd - load puzzle
-Clear     - exit
Game:
-Arrows    - moving mouse arrow
-2nd       - move piece(s)
-Alpha     - preview the solution
-Clear     - exit
Game Over:
-Any key   - exit to ION


Description
-----------
Slide Puzzle v1.0 consists of 23 pieces shuffled inside a 6x4 frame (a 16x16 pixels piece).
Your goal is to sort the pieces in correct order by sliding them using the mouse arrow.
This may feel as a hard task at beginning, but you will soon get the trick.
I suggest you start with "Classical Number Puzzle" (zpuznums.83p / zpuznums.8xp) 
often previewing the correct solution.


Making your own puzzles
-----------------------
Slide Puzzle v1.0 uses external levels (puzzles) and you can easily make your own.
Use the following procedure to make your own puzzle:

1. Draw a 96x64 pixels, monochrome picture using a graphic program (like Paint) and save it
   in bmp format for example.
   Note that your picture has to have an empty space (16x16 pixels) drawn in the 
   down-right corner. This empty space can be freely designed by you.
2. Use a Picture to Z80 tool to convert the picture you wrote to HEX data.
   I recommend using iStudio or BmpToHex programs, both available for download at
   http://www.ticalc.org.
3. Make a text file and paste the HEX picture data. Before picture data you need to define
   a header containing a search string and puzzle's description.
   Look at the zpuznums.z80 included for the example.
   Save your file as yourfile.z80 (I recommend naming your file as zpuzxxxx.z80 to
   distinguish the puzzles from the other programs on your calc, but that's not compulsory).
4. Assemble your file using a compiler and linker for TI calculator (as TASM/Devpac83).
   Refer to http://www.ticalc.org for information on how to compile programs 
   and download the tools if you have never made an assembly program for TI-calculator.
5. Send your puzzle to calculator.

Additional puzzles along with my other programs will be available on my homepage.


Disclaimer
----------
THIS PROGRAM IS FREEWARE.
YOU CAN USE IT AS LONG AS YOU WANT AND DISTRIBUTE UNMODIFIED COPIES OF THE ZIP ARCHIVE 
AS YOU RECEIVED IT.
THERE IS NO WARRANTY FOR THE PROGRAM AND I CAN NOT BE LIABLE TO YOU FOR ANY DAMAGES, 
INCLUDING BUT NOT LIMITED TO LOSS OF DATA ON YOUR CALCULATOR.
THE PROGRAMS SOURCE CODE IS INCLUDED FOR INFORMATIONAL AND EDUCATIONAL PURPOSES. 
YOU ARE NOT ALLOWED TO DISTRIBUTE ANY MODIFIED VERSIONS OF THIS PROGRAM.


Thanks to
---------
-Sam Loyd for starting "the slide puzzle mania"
-Andreas Ess & Sam Heald whose load level routine I borrowed
-Kouri Rosenberg for a routine optimization
-Patrick Shuff for beta testing


Send comments and suggestions to:
saka@hotmail.com

http://www.sakic.f2s.com


Copyright  Emir Sakic, 2001. <saka@hotmail.com>